<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>充值中心</title>
<link rel="stylesheet" href="${base}/static/media/css/bootstrap.css" />
<script src="${base}/static/index/vendor/jquery/jquery.min.js"></script>
<script src="${base}/static/index/vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${base }/static/vendor/bootstrapPager/bootstrapPager.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${base }/static/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" charset="utf-8" src="${base }/static/js/layer/layer.js"></script>
<link href="${base }/static/css/base.css" rel="stylesheet"
	type="text/css" />
<link rel="stylesheet" type="text/css"
	href="${base }/static/css/help.css" />
<script type="text/javascript"
	src="${base }/static/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript">

$(document).ready(function(){
	$("#submitButton").click(function(){
		debugger;
		var phone = $("input[name=phone]").val();
		var password = $("input[name=password]").val();
		var nickname = $("input[name=nickname]").val();
		var isCheck = true;
		if(phone==''){
			layer.msg("请输入账号");
			isCheck = false;
			return false;
		}
		if(password==''){
			layer.msg("请输入密码");
			isCheck = false;
			return false;
		}
		if(nickname==''){
			layer.msg('请输入姓名');
			isCheck = false;
			return false;
		}
		if(isCheck==true){
			layer.confirm('确定创建该账号吗?', {icon: 3, title:'提示'}, function(index){
				debugger;
				layer.close(index);
				$("#submitButton").hide();
				$("#submitShow").show();
				var data = {
					'phone' : phone,
					'password' : password,
					'nickname' : nickname
				}
				$.ajax({
		        	url:"${pageContext.request.contextPath}/admin/register/business",
		            type:'post',
		            dataType:'json',
		            data:data,
		            success:function(res)
		            {
		                if(res.status==1){
		                	layer.msg(res.msg, {icon: 1});
		                }else{
		                	layer.msg(res.msg, {icon: 5});
		                }
		                $("#submitButton").show();
						$("#submitShow").hide();
						$("#orderlist_form")[0].reset();
						
		            }
		        });
		        return false;
			});
		}
	});
});
</script>
</head>
<body style="background:#fff;">
	<div class="portlet-body">
		<form class="dataform" id="orderlist_form"
			action="${base}/admin/sumRecharger"
			method="post">
			<div class="row">
				<label class="col-md-1" style="line-height:35px;">姓名：</label>
				<div class="col-md-2">
					<input type="text" class="form-control" name="nickname"
						placeholder="请输入姓名" value="" id="">
				</div>
			</div>
			<div class="row">
				<label class="col-md-1" style="line-height:35px;">账号：</label>
				<div class="col-md-2">
					<input type="text" class="form-control" name="phone"
						placeholder="请输入手机号码" value="" id="">
				</div>
			</div>
			<div class="row" style="height:15px;"></div>
			<div class="row">
				<label class="col-md-1" style="line-height:35px;">密码：</label>
				<div class="col-md-2">
					<input type="text" class="form-control" name="password"
						placeholder="请输入密码" value=""  id="">
				</div>
				<label class="col-md-3" style="display:none;line-height:35px;" id="showRMB">
					
				</label>
			</div>
			<div class="row" style="">
				
				<div style="width:14%;height: 30px;display: inline-block;margin-left:10%;margin-top:20px;">
					<input type="button" class="btn offline_serch_hide"
						style="margin-right: 30px; background: #18BC9C; color: #fff; border-color: #18BC9C;"
						value="保存" id="submitButton">
					<input type="button" class="btn offline_serch_hide"
						style="margin-right: 30px; background: #999; color: #fff; border-color: #999;display:none;"
						value="保存中。。。" disabled="disabled" id="submitShow">
				</div>
			</div>
			<div style="width: 100%; height: 15px;"></div>
		</form>
	</div>
</body>
</html>